﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.Collections;

namespace BUS
{
    public class NguoiTimViec_BUS
    {
        public static bool Register(NguoiTimViecDTO nguoiTimViec)
        {
            return NguoiTimViec_DAO.Register(nguoiTimViec);
        }

        public static void GetRole(string UserName, ref string User_ID, ref string Role)
        {
            NguoiTimViec_DAO.GetRole(UserName, ref User_ID, ref Role);
        }

        public static void LuuCongViecDaXem(int UserID, int Mcv, DateTime ngaygio)
        {
            NguoiTimViec_DAO.LuuCongViecDaXem(UserID, Mcv, ngaygio);
        }

        public static void HuyCongViecDaXem(int UserID, int Mcv)
        {
            NguoiTimViec_DAO.HuyCongViecDaXem(UserID, Mcv);
        }

        public static IEnumerable LayThongTinCVOnline(string UserID)
        {
            return NguoiTimViec_DAO.LayThongTinCVOnline(UserID);
        }

        //public static List<CVONLINE> LayThongTinCVOnline(string UserID)
        //{
        //    return NguoiTimViec_DAO.LayThongTinCVOnline(UserID);
        //}


        public static NguoiTimViecDTO LayDanhSachThongTinNguoiTVTheoUserID(int user_id)
        {
            return NguoiTimViec_DAO.LayDanhSachThongTinNguoiTVTheoUserID(user_id);
        }

        public static bool CapNhatThongTinNguoiTimViec(int user_id, NguoiTimViecDTO nguoiTimViec)
        {
            return NguoiTimViec_DAO.CapNhatThongTinNguoiTimViec(user_id, nguoiTimViec);
        }

        public static void NhanThongTinTuNhaTuyenDung(string MaNguoiTimViec, string MaNhaTuyenDung, ref string Flag)
        {
            NguoiTimViec_DAO.NhanThongTinTuNhaTuyenDung(MaNguoiTimViec, MaNhaTuyenDung, ref Flag);
        }

        public static List<NHATUYENDUNG> DanhSachCacNhaTuyenDungDangKyNhanThongTin(int UserID)
        {
            return NguoiTimViec_DAO.DanhSachCacNhaTuyenDungDangKyNhanThongTin(UserID);
        }

        public static void HuyNhanThongTinTuNhaTuyenDung(int UserID, int Mct)
        {
            NguoiTimViec_DAO.HuyNhanThongTinTuNhaTuyenDung(UserID, Mct);
        }


        public static int GuiCVOnline(int UserID, int maNhaTuyenDung)
        {
            return NguoiTimViec_DAO.GuiCVOnline(UserID, maNhaTuyenDung);
        }

        //new update
        public static int KiemTraDongPhiCuaNguoiTimViec(int userID)
        {
            return NguoiTimViec_DAO.KiemTraDongPhiCuaNguoiTimViec(userID);
        }

        public static bool GuiCVUploadChoNhaTuyenDung(int userID, int maNhaTuyenDung, string tenCV, string duongDan)
        {
            return NguoiTimViec_DAO.GuiCVUploadChoNhaTuyenDung(userID, maNhaTuyenDung, tenCV, duongDan);
        }

        public static void CapNhatCVOnline(CVONLINE cvonline, string UserID)
        {
            NguoiTimViec_DAO.CapNhatCVOnline(cvonline, UserID);
        }

        //new update
        public static NguoiTimViec_Phi_DTO LayThongTinPhiNguoiTimViecTheoMaNTVVaMaPhi(int maNguoiTimViec, int maPhi)
        {
            return NguoiTimViec_DAO.LayThongTinPhiNguoiTimViecTheoMaNTVVaMaPhi(maNguoiTimViec, maPhi);
        }

        public static IEnumerable LayThongTinPhiVaNguoiTimViec()
        {
            return NguoiTimViec_DAO.LayThongTinPhiVaNguoiTimViec();
        }

        public static IEnumerable TimKiemPhiVaNguoiTimViec(string tuKhoa)
        {
            return NguoiTimViec_DAO.TimKiemPhiVaNguoiTimViec(tuKhoa);
        }

        public static bool CapNhatPhiNguoiTimViec(NguoiTimViec_Phi_DTO nguoiTimViecPhi, int tinhTrang)
        {
            return NguoiTimViec_DAO.CapNhatPhiNguoiTimViec(nguoiTimViecPhi, tinhTrang);
        }

        public static void BaoSaiPham(int Mcv)
        {
            NguoiTimViec_DAO.BaoSaiPham(Mcv);
        }
    }
}
